]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
switcherPopup: Use roundtrip time when the popup is modifier-less
authorJonas Dreßler <verdre@v0yd.nl>
Fri, 22 Nov 2019 19:56:30 +0000 (20:56 +0100)
committerFlorian Müllner <florian.muellner@gmail.com>
Fri, 22 Nov 2019 22:09:47 +0000 (22:09 +0000)
The noModsTimeout obviously finishes inside a timeout callback, which
means `global.get_current_time()` might return Clutter.CURRENT_TIME (ie.
0) when called inside it, because it's not called while handling an
event. This means when switching apps or activating a window, the
timestamp passed to `activate_window` may be 0, which is the reason why
the altTab switcher is currently broken when using modifier-less
keybindings.

Fix that by using `meta_display_get_current_time_roundtrip`, which
always return a valid timestamp, instead of
`shell_global_get_current_time`.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/847

js/ui/switcherPopup.js

index 44228ec1b3bc993c46d545ad828aeaf20d8a414d..fc982781f8093a9369831734a9b6230021d7c6be 100644 (file)
@@ -277,7 +277,7 @@ var SwitcherPopup = GObject.registerClass({
             GLib.PRIORITY_DEFAULT,
             NO_MODS_TIMEOUT,
             () => {
-                this._finish(global.get_current_time());
+                this._finish(global.display.get_current_time_roundtrip());
                 this._noModsTimeoutId = 0;
                 return GLib.SOURCE_REMOVE;
             });